package com.clkj.xiuzheng.dao.shangcheng;

import com.clkj.xiuzheng.pojo.shangcheng.Pond;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

/**
 * @author yawang
 * @create 2025/09/08 09:47:21
 **/
@Repository
public interface PondMapper extends Mapper<Pond> {
    @Update("update t_xz_pond set pond_remaining -=#{num} where pond_id = (select top 1  pond_id  from t_xz_pond order by pond_id desc)")
    void updatePond(Integer num);

    @Select("select top 1 * from t_xz_pond where pond_status = 1 order by pond_id desc")
    Pond getNewPond();
}
